@echo off
set heo_problem=100
set heo_solver=ga
set heo_parallel=omp
set heo_project=Release\onemax

if not exist "..\%heo_solver%\%heo_parallel%\%heo_project%_%heo_solver%_%heo_parallel%.exe" (echo ERROR: ..\%heo_solver%\%heo_parallel%\%heo_project%_%heo_solver%_%heo_parallel%.exe not found
echo Please build project %heo_project%_%heo_solver%_%heo_parallel%
goto :eof
)

for %%G in (1 2 4) do (call :run %%G)
goto :eof

:run
echo %1
if not exist "..\!res\%heo_problem%\%1" @mkdir "..\!res\%heo_problem%\%1"
set OMP_NUM_THREADS=%1
"..\%heo_solver%\%heo_parallel%\%heo_project%_%heo_solver%_%heo_parallel%.exe" "%heo_solver%_%heo_problem%.ini" > "..\!res\%heo_problem%\%1\%heo_solver%.%heo_parallel%.txt"
